﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BattleThis.Core.Battle
{
	/// <summary>
	/// Descripte Balance of a Unit.
	/// </summary>
	public class Balance
	{

		#region Variablen
		/// <summary>
		/// A Empty balance.
		/// </summary>
		public readonly static Balance Empty = new Balance();
		#endregion

		#region Properties

		/// <summary>
		/// Gets or (protected sets) the effective.
		/// </summary>
		/// <value>
		/// The effective.
		/// </value>
		public IEnumerable<UnitType> Effective { get; protected set; }

		/// <summary>
		/// Gets or (protected sets) the in effective.
		/// </summary>
		/// <value>
		/// The in effective.
		/// </value>
		public IEnumerable<UnitType> InEffective { get; protected set; }

		#endregion

		#region Methoden

		/// <summary>
		/// Initializes a new instance of the <see cref="Balance"/> class.
		/// </summary>
		protected Balance ()
		{
			this.Effective = Enumerable.Empty<UnitType>();
			this.InEffective = Enumerable.Empty<UnitType>();
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="Balance"/> class.
		/// </summary>
		/// <param name="effective">The effective.</param>
		/// <param name="inEffective">The in effective.</param>
		public Balance( IEnumerable<UnitType> effective, IEnumerable<UnitType> inEffective )
		{
			if( effective == null ) throw new ArgumentNullException( "effective" );
			if( inEffective == null ) throw new ArgumentNullException( "inEffective" );

			this.Effective = effective;
			this.InEffective = inEffective;
		}

		#endregion
		
	}
}